/**
 * @Title: BalanceService
 * @Package cn.com.yiqi.wsc.service.balance
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/3/3 11:23
 * @version V1.0
 */
package cn.com.yiqi.wsc.service.balance;

import cn.com.yiqi.wsc.Ro.BalanceRecordVO;
import cn.com.yiqi.wsc.common.Result;
import cn.com.yiqi.wsc.dao.balance.entity.BalanceFetchEntity;
import cn.com.yiqi.wsc.service.balance.dataobject.BalanceRecordDO;

import java.math.BigDecimal;
import java.util.List;

/**
 *
 *@ClassName: BalanceService
 * @Description: TODO
 * @author 会员系统组-胥钰淋
 * @date 2017/3/3 11:23
 *
 */
public interface BalanceService {

    /**
     * 积分兑换余额
     * @param customerId
     * @param point
     * @return
     */
    Result<Boolean> point2Balance(Long customerId, Integer point);

    /**
     * 提交余额提现申请
     * @param customerId
     * @param amount
     * @return
     */
    Result<Boolean> submitFetchRequest(Long customerId, Float amount);

    /**
     * 审核通过提现申请
     * @param fetchId
     * @return
     */
    Result<Boolean> passFetchRequest(Long fetchId);

    /**
     * 审核不通过提现申请
     * @param fetchId
     * @return
     */
    Result<Boolean> notPassFetchRequest(Long fetchId);

    /**
     * 余额详情
     * */
    List<BalanceRecordVO> balanceList(Integer userId);

    /**
     *余额提现申请记录
     */
    List<BalanceFetchEntity> selectFetchListByUserId(Integer userId);


    /**
     * 是否可以提现
     * */
    Result canWithdraw(Integer userId, BigDecimal balance);

    Result withDrawIndex(Integer userId);

    /**
     * 花费余额
     * */
    Integer CostBalance(BalanceRecordDO bdo);

    /**
     * 返还余额
     * */
    Integer getBalance(BalanceRecordDO bdo);


}
